package hn.cch.test.entity;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

public class ObjectEntity implements Serializable {

    private static final long serialVersionUID = 3194029060160335388L;

    private double[] doubleArray;
    private List<String> stringList;
    private Set<String> stringSet;
    private Map<String, String> stringStringMap;
    private FieldClass fieldClass;

    public static ObjectEntity getObjectEntity() {
        ObjectEntity objectEntity = new ObjectEntity();
        objectEntity.setDoubleArray(new double[]{0.1, 0.2, 0.3});
        objectEntity.setStringList(new ArrayList<>(Arrays.asList("A1", "B2")));
        objectEntity.setStringSet(new HashSet<>(Arrays.asList("A1", "B2")));
        Map<String, String> stringStringMap = new HashMap<>();
        stringStringMap.put("key1", "value1");
        stringStringMap.put("key2", "value2");
        for (int i = 0; i < 1000; i++) {
            String key = UUID.randomUUID().toString();
            String value = key + key + key + key + key;
            stringStringMap.put(key, value);
        }
        objectEntity.setStringStringMap(stringStringMap);
        FieldClass fieldClass = new FieldClass();
        fieldClass.setString("string");
        objectEntity.setFieldClass(fieldClass);
        return objectEntity;
    }

    public double[] getDoubleArray() {
        return doubleArray;
    }

    public void setDoubleArray(double[] doubleArray) {
        this.doubleArray = doubleArray;
    }

    public List<String> getStringList() {
        return stringList;
    }

    public void setStringList(List<String> stringList) {
        this.stringList = stringList;
    }

    public Set<String> getStringSet() {
        return stringSet;
    }

    public void setStringSet(Set<String> stringSet) {
        this.stringSet = stringSet;
    }

    public Map<String, String> getStringStringMap() {
        return stringStringMap;
    }

    public void setStringStringMap(Map<String, String> stringStringMap) {
        this.stringStringMap = stringStringMap;
    }

    public FieldClass getFieldClass() {
        return fieldClass;
    }

    public void setFieldClass(FieldClass fieldClass) {
        this.fieldClass = fieldClass;
    }
}
